/**
 * 个人中心模块接口列表
 */

import base from './base'; // 导入接口域名列表
import axios from '@/request/httpRequest'; // 导入http中创建的axios实例
import qs from 'qs'; // 根据需求是否导入qs模块

const person = {
	//获取个人中心身份信息
	userInfo(params) {
		return axios.post(`${base.sq}/member/Members/getMemberByToken?size=M&terminaltype=PC&token=${params.token}`, params.data)
	},
	//获取足迹

	getHistories(params) {
		return axios.post(`${base.sq}/client/ProductViewHistorys/getHistories?size=M&terminaltype=PC&token=${params.token}`, params.data)
	},

	// 删除足迹delete
	deleteHistories(params) {
		return axios.post(`${base.sq}/client/ProductViewHistorys/delete?size=M&terminaltype=PC&token=${params.token}`, params.data)
	},
	// 获取收藏列表
	getProductFavorites(params) {
		return axios.post(`${base.sq}/client/ProductFavorites/getProductFavorites?size=M&terminaltype=PC&token=${params.token}`, params.data);
	},
	//保存个人信息

	userSave(params) {
		return axios.post(`${base.sqq}api/user/userSave`, params)
	},
	//我的消息列表
	userMsgList(params) {
		return axios.post(`${base.sq}/client/Bulletins/getDifBulletins?size=M&terminaltype=PC&${qs.stringify(params)}`, {})
	},
	//更新消息状态
	updateMsgList(params) {
		return axios.post(`${base.sq}/client/Bulletins/modifyBulletinStatus?size=M&terminaltype=PC&${qs.stringify(params)}`, {})
	},
	//删除消息
	deleteMsgList(params) {
		return axios.post(`${base.sq}/client/Bulletins/rescindBulletin?size=M&terminaltype=PC&${qs.stringify(params)}`, {})
	},
	//地址列表
	addressList(params) {
		return axios.post(`${base.sq}/member/Members/getMemberAddress?size=M&terminaltype=PC&${qs.stringify(params)}`, {})
	},

	//新增收货人地址
	addAddress(params) {
		return axios.post(`${base.sq}/member/Members/saveMemberAddress?size=M&terminaltype=PC&token=${params.token}`, { "model": params.data })
	},
	//删除收货人地址
	deleteAddress(params) {
		return axios.post(`${base.sq}/member/Members/deleteMemberAddress?size=M&terminaltype=PC&token=${params.token}`, { 'model': params.data })
	},
	//获取 省
	getProvinces(params) {
		return axios.post(`${base.sq}/client/Regions/getProvinces?size=M&terminaltype=PC&${qs.stringify(params)}`, {})
	},
	//获取 市
	getCitysFromProvince(params) {
		return axios.post(`${base.sq}/client/Regions/getCitysFromProvince?size=M&terminaltype=PC&${qs.stringify(params)}`, {})
	},
	//获取 区
	getDistrictFromCity(params) {
		return axios.post(`${base.sq}/client/Regions/getDistrictFromCity?size=M&terminaltype=PC&${qs.stringify(params)}`, {})
	},
	//获取订单数量
	getOrderStyleCount(params) {
		return axios.post(`${base.sq}/client/Orders/getOrderStyleCount?size=M&terminaltype=PC&${qs.stringify(params)}`, {})
	},
	//获取订单列表
	getUserOrders(params) {
		return axios.post(`${base.sq}/client/orders/getUserOrders?size=M&terminaltype=PC&token=${params.token}`, params)
	},
	//删除订单
	delUserOrders(params) {
		return axios.post(`${base.sq}/client/orders/hiddenOrder?size=M&terminaltype=PC&token=${params.token}`, params.data)
	},
	//获取取消订单原因
	getReasonContentList(params) {
		return axios.post(`${base.sq}/client/OrderCancelReason/getReasonContentList?size=M&terminaltype=PC&token=${params.token}`, { type: 'orderclose' })
	},
	//取消订单
	closeOrder(params) {
		return axios.post(`${base.sq}/client/Orders/closeOrder?size=M&terminaltype=PC&token=${params.token}`, params.data)
	},
	//获取订单详情
	getDetail(params) {
		return axios.post(`${base.sq}/client/Orders/getDetail?size=M&terminaltype=PC&token=${params.token}`, params.data)
	},
	//banner
	banner(params) {
		return axios.post(`${base.sqq}api/index/banner`, params);
	},
	//更新头像
	uploadheadimg(params) {
		return axios.post(`${base.sqq}api/score/uApi/type/uploadheadimg?uid=${params.uid}`, params.file);
	},
	//验证码验证
	checkverifcode(params) {
		return axios.post(`${base.sqq}api/score/uApi/type/checkverifcode`, params);
	},
	//发送验证码
	requestphoneverifycode(params) {
		return axios.post(`${base.sqq}api/score/uApi/type/requestphoneverifycode`, params);
	},
	//发送验证码
	sendvalidcode(params) {
		let cc = encodeURIComponent('ms/message/sendvalidcode')
		return axios.post(`${base.sqq}api/score/uApi?action=${cc}`, params);
	},
	//验证码验证自己
	checkvalidcode(params) {
		let cc = encodeURIComponent('ms/message/checkvalidcode')
		return axios.post(`${base.sqq}api/score/uApi?action=${cc}`, params);
	},
	//修改手机号
	resetphone(params) {
		return axios.post(`${base.sqq}api/score/uApi/type/resetphone`, params);
	},
	// 修改邮箱
	resetEmall(params) {
		return axios.post(`${base.sqq}member/Members/save&size=M&terminaltype=PC&token=${params.token}&iShopId=`, params);
	},
	//退货申请
	save(params) {
		return axios.post(`${base.sq}/client/SaleReturns/save?size=M&terminaltype=PC&token=${params.token}`, params);
	},
	//退货详情
	getReturnDetail(params) {
		return axios.post(`${base.sq}/client/Orders/getReturnDetail?size=M&terminaltype=PC&token=${params.token}`, params);
	},
	// 退货详情淦
	getSaleReturnByDetailId(params) {
		return axios.post(`${base.sq}/client/SaleReturns/getSaleReturnByDetailId?iShopId=&size=M&terminaltype=PC&token=${params.token}`, params)
	},
	// 退货详情2
	getSaleReturnBySaleReturnNo(params) {
		return axios.post(`${base.sq}/client/SaleReturns/getSaleReturnBySaleReturnNo?&size=M&terminaltype=PC&token=${params.token}`, params)
	},
	//卖家退货
	returnGoods(params) {
		return axios.post(`${base.sq}/client/SaleReturns/returnGoods?size=M&terminaltype=PC&token=${params.token}`, params.data);
	},
	// 退货列表
	getSaleReturnList(params) {
		return axios.post(`${base.sq}/client/SaleReturns/getSaleReturnList?size=M&terminaltype=PC&token=${params.token}`, params);
	},
	//获取物流公司
	getLogisticsCorp(params) {
		return axios.post(`${base.sq}/client/Orders/getLogisticsCorp?size=M&terminaltype=PC&token=${params.token}`, {});
	},
	// 获取订单物流信息client/Orders/lookExpress
	LookExpressGetList(params) {
		return axios.post(`${base.sq}/client/Orders/lookExpress?size=M&terminaltype=PC&token=${params.token}`, params.data);
	},
	//评价
	saveBatch(params) {
		return axios.post(`${base.sq}/member/Comments/saveBatch?size=M&terminaltype=PC&token=${params.token}`, params.data);
	},
	//文件上传
	upload(params) {
		return axios.post(`${base.sqq}api/common/upload`, params);
	},
	//专题收藏列表 // 我的收藏专题列表
	topicCollectList(params) {
		return axios.post(`${base.sqq}api/topic/topicCollectList`, params);
	},
	// 确认收货
	batchConfirmTake(params) {
		return axios.post(`${base.sq}/client/Orders/batchConfirmTake?size=M&terminaltype=PC&token=${params.token}`, params.data)
	},
	// 取消退款client/SaleReturns/cancelSaleReturn
	cancelSaleReturnAPI(params) {
		return axios.post(`${base.sq}/client/SaleReturns/cancelSaleReturn?size=M&terminaltype=PC&token=${params.token}`, params.data)
	},
	// 修改退款信息/client/SaleReturns/update
	SaleReturnsUpdate(params) {
		return axios.post(`${base.sq}/client/SaleReturns/update?size=M&terminaltype=PC&token=${params.token}`, params.data)
	},
	// 获取个人中心卡券列表
	getCouponList(data) {
		return axios.post(`${base.sq}/coupon/MemberCouponServer/getCouponList?size=M&terminaltype=PC&token=${data.token}`, { param: data.data })
	},
	// 获取个人中心积分列表 member/MemberPoint/getPointDetail
	getPointDetail(data) {
		return axios.post(`${base.sq}/member/MemberPoint/getPointDetail?size=M&terminaltype=PC&token=${data.token}`, data)
	},

	// 我的礼品卡
	getMemberGiftCardsList(params) {
		return axios.post(`${base.sq}/giftcard/ClientServer/getMemberGiftCardsList?size=M&terminaltype=PC&token=${params.token}`, params.data)
	},
	// 我的礼品卡角标giftcard/ClientServer/getCountGiftCard
	ClientServergetCountGiftCard(params) {
		return axios.post(`${base.sq}/giftcard/ClientServer/getCountGiftCard?size=M&terminaltype=PC&token=${params.token}`, params.data)
	},
	// 我的礼品卡转让时手机号查询会员giftcard/ClientServer/searchMember
	SearchMember(params) {
		return axios.post(`${base.sq}/giftcard/ClientServer/searchMember?size=M&terminaltype=PC&token=${params.token}`, params.data)
	},
	// 礼品卡转赠giftcard/ClientServer/transferGiftCard
	TransferGiftCard(params) {
		return axios.post(`${base.sq}/giftcard/ClientServer/transferGiftCard?size=M&terminaltype=PC&token=${params.token}`, params.data)
	},
	// 获取个人中心储值卡列表
	StorageCardGetDetail(params) {
		return axios.post(`${base.sqq}api/score/uApi?action=${params.action}&access_token=${params.token}`, params.data)
		// return axios.get(`${base.sq3}/member/StorageCard/getDetail?size=M&terminaltype=PC&token=${params.token}&iType=${params.iType}&pageIndex=${params.pageIndex}&pageSize=${params.pageSize}&dBegin=${params.dBegin}&dEnd=${params.dEnd}&iShopId=${params.iShopId}`)
		// return axios.post(`${base.sq}/member/StorageCard/getDetail?size=M&terminaltype=PC&token=${params.token}`,params.data)
	},
	//获取个人中心储值卡余额 /member/StorageCard/cardDetail
	StorageCardCardDetail(params) {
		return axios.post(`${base.sq}/member/StorageCard/cardDetail?size=M&terminaltype=PC&token=${params.token}`, params.data)
	},
	// 开电子发票client/EInvoices/saveEInvoice
	EinvoicesSaveEinvoice(params) {
		return axios.post(`${base.sq}/client/EInvoices/saveEInvoice?size=M&terminaltype=PC&token=${params.token}`, params.data)
	},
	getEInvoice(params) {
		// return axios.get(`${base.sq}/client/EInvoices/getEInvoice?size=M&terminaltype=PC&token=${params.token}&orderNo=${params.orderNo}&iShopId=${params.iShopId}`,params.data)//发票列表
		return axios.post(`${base.sq}/client/EInvoices/getEInvoice?size=M&terminaltype=PC&token=${params.token}`, params.data)//发票列表
	},
	// 礼品卡删除giftcard/ClientServer/deleteGiftCard
	DeleteGiftCard(params) {
		return axios.post(`${base.sq}/giftcard/ClientServer/deleteGiftCard?size=M&terminaltype=PC&token=${params.token}`, params.data)//发票列表
	},
	// 删除我的卡券coupon/MemberCouponServer/deleteCoupon
	DeleteCoupon(params) {
		return axios.post(`${base.sq}/coupon/MemberCouponServer/deleteCoupon?size=M&terminaltype=PC&token=${params.token}`, params.data)//删除我的卡券coupon
	}
	// 其他接口…………
}

export default person;
